package model.actions;

import metier.GameState;
import metier.Objet;

public class ChangeRepresentationAction extends Action {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7791711443278876347L;
	protected String idRepresentation;
	
	public ChangeRepresentationAction() {
		super();
	}
	
	public ChangeRepresentationAction(String idRepresentation) {
		super();
		this.idRepresentation = idRepresentation;
	}

	public String getIdRepresentation() {
		return idRepresentation;
	}

	public void setIdRepresentation(String idRepresentation) {
		this.idRepresentation = idRepresentation;
	}

	@Override
	public void commit(GameState state, Objet sender) {
		sender.setRepresentation(state.getParameters().getRepresentations().get(idRepresentation));
	}

}
